package com.kyivmohyla.kma2.client.view.operator;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;
import com.google.inject.Inject;
import com.kyivmohyla.kma2.client.presenter.operator.FileUploadPresenter;

public class FileUploadView extends Composite implements FileUploadPresenter.Display {
    private static FileUploadViewUiBinder ourUiBinder = GWT.create(FileUploadViewUiBinder.class);
    @UiField
    protected FileUpload fileUpload;
    @UiField
    protected FormPanel formPanel;
    @UiField
    protected Button importButton;
    @UiField
    protected Button cancelButton;

    @Inject
    public FileUploadView() {
        initWidget(ourUiBinder.createAndBindUi(this));
    }

    @Override
    public FileUpload getFileUpload() {
        return fileUpload;
    }

    @Override
    public FormPanel getFormPanel() {
        return formPanel;
    }

    @Override
    public HasClickHandlers getImportButton() {
        return importButton;
    }

    @Override
    public HasClickHandlers getCancelButton() {
        return cancelButton;
    }

    @Override
    public Widget asWidget() {
        return this;
    }

    interface FileUploadViewUiBinder extends UiBinder<HTMLPanel, FileUploadView> {
    }


}